package com.xyd.services.impl;

import com.xyd.dao.StreetMapper;
import com.xyd.pojo.Street;
import com.xyd.services.StreetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("streetService")
public class StreetServiceImpl implements StreetService {
    @Autowired
    private StreetMapper streetMapper;
    @Override
    public List<Street> getAllStreet(int districtId) {
        List<Street> streetList = streetMapper.getStreet(districtId);
        return streetList;
    }

    @Override
    public List<Street> getAll() {
        List<Street> streets = streetMapper.getAll();
        return streets;
    }

    @Override
    public Street getOneByStreetId(int streetId) {
        return streetMapper.getOneByStreetId(streetId);
    }
}
